<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta content="telephone=no" name="format-detection" />
    <link rel="stylesheet" href="static/css/layout.css" />
    <link rel="stylesheet" href="static/css/style.css" />
</head>
<body style="background: #ebebeb;">
<div id="adv-header">
    <div class="header-inner">
        <div class="tit"><img src="<{$smarty.const.__STATIC__}>images/tit2.png" /></div>
        <div class="ren"><img src="<{$smarty.const.__STATIC__}>images/ren.png" /></div>
        <img class="bac" src="<{$smarty.const.__STATIC__}>images/xqbac.jpg"/>
    </div>
</div>
<div id="adv-btns">
    <div class="btn">
        <a class="lp" href="javascript:void(0)">发动好友帮忙拉票</a>
    </div>
    <div class="btn">
        <a href="rule.html">活动规则</a>
    </div>
    <div class="btn">
        <a class="shadow" href="#">实时投票排行榜</a>
    </div>
</div>
<div id="rank-bar">
    <ul class="rank-list">
        <{foreach from=$userList key=num item=user}>
        <li><span class="l">第 <{$i=$i+1}><{$i}> 名</span><span class="c"><{$user->name}></span><span class="r"><{$user->like_count}>票</span></li>
        <{/foreach}>
    </ul>
    <a class="link" href="#">切换点别人链接</a>
</div>
<div id="rule">
    <h2 class="rule-tit"><span>活动规则<em class="arrr arr"><img src="<{$smarty.const.__STATIC__}>images/arr.png"/></em><em class="arr arrl"><img src="<{$smarty.const.__STATIC__}>images/arr.png"/></em></span></h2>
    <dl class="mianf">
        <dt><span>免费福梨1：</span></dt>
        <dd>收集满20个好友投票的，可免费获得友吃送出的连州水晶梨礼盒一份，限量400份。</dd>
    </dl>
    <dl class="mianf">
        <dt><span>免费福梨2：</span></dt>
        <dd>所有人员均可参加友吃连州水晶梨众筹活动，支持山区农户。<a href="http://ma.taobao.com/ZRbnra">（点击此处，在浏览器打开）</a></dd>
    </dl>
    <dl class="mianf">
        <dt><span>免费福梨3：</span></dt>
        <dd>8月15日投票截止，票数最高的前20名吃货达人可赢得<a href="zen.html">（曾屋料理）</a>送出的250元/位下午茶聚会（因个人原因无法参加的，友吃不承担其损失）；与友吃小编一起玩游戏，品下午茶。</dd>
    </dl>
    <dl class="mianf">
        <dt><span>免费福梨3：</span></dt>
        <dd>获得奖品，请下载【友吃】APP，填写个人收货信息；</dd>
        <dd>8月16~20日内会有专人客服电话联系确认收货地址和免费下午茶聚会的参加时间；</dd>
        <dd>【友吃】微信公众号也会同时公布美食下午茶的20位吃货达人的免费名单和活动时间，敬请留意；</dd>
        <dd>快递会在8月17日后统一发货，若在发货5日内未收到水晶梨，或对活动内容有疑问，请与【友吃】公众号客服联系，或致电020-81245266查询</dd>
        <dd>如发现恶意刷票行为立即取消参与资格，活动最终解释权，归【友吃】App官方所有！</dd>
    </dl>
</div>
<div id="all-page" style="display: none;"></div>
<div id="reg-div" class="fixed-box" style="display: none;">
    <div class="fixed-cont">
        <h2 class="cyut">请输入您的昵称和手机号获取<br/><免费参与码>昵称</h2>
        <form action="register.php" method="post" id="regForm">
            <input type="hidden" name="openid" value="default_openid" />
            <input type="hidden" name="submit" value="submit" />
            <!--
                <input type="hidden" name="appId" value="<{$appId}>" />
                <input type="hidden" name="timestamp" value="<{$timestamp}>" />
                <input type="hidden" name="nonceStr" value="<{$nonceStr}>" />
                <input type="hidden" name="signature" value="<{$signature}>" />
                -->
            <dl class="texts">
                <dd class="text"><input type="text" name="name" value="<{$name}>" placeholder="昵称" /></dd>
                <dd class="text"><input type="text" name="phone" value="1235445654" placeholder="手机号码" /></dd>
                <!--<dd class="text"><input class="d" type="text" value="" placeholder="免费参与码" />
                    <span class="hq">获取验证码</span>
                    -->
                </dd>
                <input type="submit" class="btn" value="确定提交" />
                <dd class="hint">注意：每个手机号只能参与一次！</dd>
            </dl>
        </form>
    </div>
</div>
<div class="fixed-box" style="display: none;">
    <div class="fixed-cont">
        <div class="xinxi">
            <div class="que-bar">
                <span class="que"><img src="static/images/que.png"></span>
            </div>
            <div class="que-txt"> 只能为好友抢一次福利哦！</div>
            <div class="que-btn">确定</div>
        </div>
    </div>
</div>
<div id="confirm-div" class="fixed-box" style="display: none;">
    <div class="fixed-cont">
        <div class="xinxi">
            <div class="que-bar">
                <span class="que"><img src="static/images/que.png"></span>
            </div>
            <div class="que-txt2">
                   <span>
                        您已成功参与活动，赶快发送给好友、分
                    享到朋友圈及微信群，让大家投票【帮周
                    周抢福利】
                   </span>
            </div>
            <div class="que-btn">确定</div>
        </div>
    </div>
</div>
<div class="share-hint" style="display: none;">
    <div class="zhe"><img src="static/images/zhe.png"></div>
    点击右上角菜单，赶快发送给好友、分享
    到朋友圈及微信群，让大家投票【帮<{$name}>
    抢福梨】
</div>
<script src="static/js/zepto.min.js" type="text/javascript"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript"></script>
<script src="static/js/public.js" type="text/javascript"></script>
<script>

    $(function(){
        $("#all-page").on("tap",function(){
            $(this).hide();
            $(".fixed-box").css("display","none");
            $(".share-hint").css("display","none");
        });
        $("#adv-btns .lp").on("tap",function(){
            $("#all-page").show()
            $(".share-hint").css("display","block");
        })
        $(".que-btn").on("tap",function(){
            var parent = $(this).parents(".fixed-box");
            parent.css("display","none");
            $("#all-page").hide();
        });
        // 表单注册
        $('#regForm').submit(function(){
            var url = $(this).attr('action');
            $.ajax({
                type: "post",
                url: url,
                dataType: "text",
                data: $(this).serialize(),
                success: function(text){
                    var msg = text.split('_');
                    if(text.indexOf('ok') != -1){
                        $('#reg-div').hide();
                        $('#confirm-div').css('display','block');
                    }else{
                        alert(msg[1]);
                    }
                },
                error : function (json) {
                    alert("error"+ JSON.stringify(json));
                }
            });
            return false;
        });
    });

    

    /*
     wx.checkJsApi({
     jsApiList: [
     'onMenuShareTimeline',
     'onMenuShareAppMessage'
     ],
     success: function (res) {
     //alert(JSON.stringify(res));
     }
     });
     */


</script>
</body>
</html>